Skip to content

fix(service-knowledge)!: retire the knowledge field gate's title arm behind a per-source recipe proof - #37963

Draft
objectstack-fleet[bot] wants to merge 12 commits into
mainfrom
claude/area-o1C-37467
Draft

objectstack-fleet[bot] wants to merge 12 commits into
mainfrom
claude/area-o1C-37467

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

Fixes #37467

Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no published skill teaches the knowledge field gate or its refusals (git grep of skills/objectstack-ai for the gate, the display field and KNOWLEDGE_REBUILD_REQUIRED: 0 hits)
Security-touching: yes

维护者速读

  • 用户能看到什么变化:知识检索的权限过滤不再额外检查名为“标题”的旧字段;对象同时有“标题”字段和另一个显示字段的知识源,只有在索引确认按当前方式完整建成后才对非系统用户开放,而且每条命中都要与记录的当前内容核对,对不上的不返回。
  • 为什么做:知识检索收口(知识库检索按调用者权限过滤)的遗留清理:旧索引兼容分支退役,改为按知识源确认索引、按命中核对内容。
  • 出错会怎样:最坏是这类知识源在重建完成前检索不到内容(会明确报“需要重建”),或刚改过的个别记录暂时搜不到(后台自动补写);不会泄露无权字段,改动可直接撤回。
  • 要你做什么:审阅这次安全相关的收紧,决定是否合并。

What changes

  • The field gate's title arm is gone (knowledge-source-admission.ts, servedFieldsOf). The gate asks about exactly what a document carries under the current recipe: each content and metadataFields member and the display field (documentTitleField), less the fields an index never carries.
  • Per-source proof at search time (KnowledgeService.unprovenIndex, from planSearches). mayServeEarlierRuleTitle names the sources where the retired arm mattered: the object declares a field named title (or its fields cannot be enumerated), the index may carry it, and the source does not serve it. For a non-system caller such a source is searched only when its adapter's indexStatus reports the fingerprint AND the recipe hash planIndex computes now, and only where the builds that record that hash purge. It is never proven for refresh.onRecordChange: false, or on an adapter with no indexStatus, no completeBuild or no listDocuments.
  • Per-hit check on a proven source (KnowledgeService.dropUnverifiedHits; the seat's ruling S1 = B). The proof speaks for the index as its last complete build left it. So each hit of a proven source is served only when (a) one system-context read per source per search round, where AND id in the hits' record ids, answers its record, (b) its documentId is the one the source derives from that record, and (c) its stored docHash equals the one recordToDocument computes from the row under the current object definition. The hash covers the title. Every way the check cannot be made drops the hit: the read throws or answers no list, the hit has no sourceRecordId or no stored hash, the hash cannot be computed, or the tenancy posture cannot be read. The read decides survival only. A surviving hit is returned as the store answered it, and nothing the read returned is put on it. A stale or missing record's own document is repaired in the background through the existing repairStale, once per document until a later search finds it current; a document under a foreign id is dropped and not repaired. Under record granularity checkFreshness then reads the same records again, so "one read" is the new check's own cost.
  • Without the proof the source is refused, never served through the old arm: named in refused as KNOWLEDGE_REBUILD_REQUIRED / 409. That code is already in @objectstack/service-knowledge's error-code ledger, which this PR does not change. A search where it was the only source refuses whole. The caller and the operator are told what ends the refusal: a complete rebuild, nothing (a configuration no build can prove), or the next search (an unreadable status). A refused search starts no build and writes nothing.
  • A source that needs the index proof is never searched without it. The adapter a source binds to is resolved once per search, in planSearches: the proof is read from that instance, both search rounds search that same instance, and a source whose adapter does not resolve at the plan carries the coded refusal its resolution answered and is refused, never searched. searchRound no longer looks an adapter up.
  • Every other source pays nothing: no proof read and no per-hit read when the object declares no title, its display field is title, title is credential-class or internal, or the source serves title itself.
  • Save door (ADR-0161 K4 guard two): the same servedFieldsOf judges a save, so an author no longer needs to query a title field the source never indexes. This is the widening half of the declaration; the display field is still asked.
  • Docs: content/docs/protocol/knowledge.mdx (the title rule, the proof, the permanent cases, the per-hit check) and content/docs/ai/knowledge-rag.mdx (the second cause of KNOWLEDGE_REBUILD_REQUIRED).

Measurements: the per-hit read

Method, enough to rebuild it (the script is not committed: it imports the in-memory driver from its source by relative path, which is not a dependency of this package):

  • Engine and driver: new ObjectQL() from @objectstack/objectql, registerDriver(new InMemoryDriver(), true) with InMemoryDriver imported from packages/drivers/driver-memory/src/index, then init(). One object account (text name, text title, textarea body) registered with registry.registerObject.
  • Rows: 2,000, inserted in the system context: name "Acme i", title "T i", body "body text i " repeated 40 times.
  • Source and service: object source s over account, content: ['body']; new KnowledgeService({ dataEngine: engine }) with a stub adapter registered as memory.
  • Hits: for each size n in 5, 25 and 100, the first n rows read in the system context; each hit's documentId is s:ID, its sourceRecordId the row id, and its docHash recordToDocument(source, source.source, row, engine.getSchema('account')).docHash. So every hit is current.
  • Timing: call dropUnverifiedHits(hits, new Set(['s'])) 20 times to warm up, then 200 timed rounds per size with performance.now(); p50 and p95 from the sorted times. engine.find is wrapped to count system-context calls (round trips) and the rows they return (rows read).
  • Re-run: put the file in packages/services/service-knowledge/src/__tests__/, run pnpm --filter @objectstack/service-knowledge exec vitest run --maxWorkers=1 FILE, delete it.
  • Box: the shared container, beside sibling verify runs; load averages (1, 5, 15 min) 8.07, 7.98, 7.60 at the run. Read the times as an upper bound on CPU cost. A remote driver adds one database round trip per proven source per round.
hits checked when round trips per round rows read per round p50 p95
5 small: one topK 5 page of hits 1 5 1.5 ms 2.5 ms
25 first round at topK 5 (SEARCH_FIRST_ROUND_FACTOR 5) 1 25 3.3 ms 7.6 ms
100 refill at topK 5 (SEARCH_REFILL_FACTOR 20) 1 100 9.2 ms 14.5 ms

An earlier run of the same method at load about 7 read 1.6/5.1, 3.3/6.2 and 9.5/12.3 ms (p50/p95).

Rows read are bounded by the distinct record ids among the round's hits of proven sources, projected to the fields assembly reads. Every hit was served in every timed round, so the recomputed hash agrees with the stored one end to end on the real engine.

Tests

packages/services/service-knowledge/src/__tests__/knowledge-source-admission.test.ts:

  • proven index: a caller who may not query title is served, and the stored hit is returned unchanged;
  • unproven, seven ways (no indexStatus, no completeBuild, no listDocuments, no recipe hash, another recipe hash, another fingerprint, a throwing indexStatus) plus refresh.onRecordChange: false: refused KNOWLEDGE_REBUILD_REQUIRED / 409, never searched. The caller message and the warn line promise a rebuild only where one ends the refusal, and the system context is still served;
  • per-hit check (new describe): CONTROL served with exactly one system read; the read's fields never reach the caller; dropped for a stored hash that is not the current one, a hit whose stored docHash differs from the record's current build inputs, a document a complete build kept, a foreign documentId, no hash, an empty hash, and a record the read no longer answers; fails closed for a read that throws, one that answers no list, an unreadable tenancy posture, a hash that cannot be computed, and a hit with no sourceRecordId; a source with a where: the system read asks for { $and: [where, { id: { $in } }] } and a record outside where is dropped; the refill round: a proven source saturates the first round with stale hits, the refill runs, and its stale hits are dropped while its current hit is served; a source searched without the proof is not checked; two race pins for the rule that a source that needs the index proof is never searched without it: another adapter instance registered under the same id while the proof is read is not searched, and an adapter that registers only after its source was planned is not searched that search (the source is refused SERVICE_UNAVAILABLE / 503);
  • an unproven source beside a searchable one; sources where the arm never mattered read nothing; rebuilt: refused (no beginBuild, upsert or completeBuild call), then rebuildSource completes and the source is served;
  • reverse pins: on a proven index the display field, a content field and a metadataFields field the caller may not query each still refuse the source; on an unproven index a stored earlier-rule title never reaches the caller;
  • mayServeEarlierRuleTitle table; save door.
Readings at 3a69848
  • pnpm exec vitest run --maxWorkers=2 in packages/services/service-knowledge: Test Files 18 passed (18), Tests 611 passed (611), after the merge of main and a rebuild of the dependency closure under the verify lock.
  • pnpm typecheck in the package (tsc plus check:test-typecheck): exit 0, "0 file(s) / 0 error(s)".
  • The admission file alone: 83 passed (83).
Ablations (one on-disk mutation each, file restored after)

Per-hit check, each run against the admission file:

  • hash not compared: red, the four stored-hash-differs cases (the refill pin among them);
  • documentId not checked: red, the foreign document;
  • usable-hash filter and equality both admit a missing hash: red, no hash and empty hash. The usable filter ablated alone stays green, because the equality also refuses a missing hash, so this is a double ablation by design;
  • a record the read no longer answers passes: red, that case;
  • a read error serves the hits: red; a non-list answer serves them: red;
  • an unreadable posture proceeds: red;
  • a hash that cannot be computed trusts the store: red;
  • no sourceRecordId: the permission filter ablated alone leaves the new pin green (the check holds it) and turns the existing filter pin red; filter plus the check's record-id test ablated turns the new pin red;
  • the read's row put on the hit: red, CONTROL and the no-leak pin;
  • every source checked: red, the unproven-source case and the hits elsewhere that carry no hash;
  • S4 (a), the where conjunct dropped (the system read's where replaced by the id list alone): red, the where case;
  • S4 (b), the refill round not checked (served(...) removed from the refilledKept call site only): red, the refill case;
  • the first-round call site not checked (served(...) removed from the kept call site only): red, 13 cases;
  • the check not wired (the body of served replaced by returning the hits, which removes the check at both call sites, first round and refill): red, 13 cases.
  • resolve once undone (searchRound looks the adapter up again by the source's binding, as before): red, both race pins.

Proof and refusal (earlier rounds, unchanged code): arm restored, proof skipped, recipe hash not compared, fingerprint not compared, predicate always true, withheld title ignored, served-field check removed, onRecordChange: false proven, no listDocuments proven, no completeBuild proven, a never refusal promising a rebuild, a refused search starting a build: each red.

Gates at 3a69848

Acceptance notes

  • Card acceptance 1, per-source proof at search time: unprovenIndex reads indexStatus against planIndex's fingerprint and recipe hash on every search that needs it, never cached. It adds no contract member and no stored state.
  • Card acceptance 2: the arm is removed for proven sources. Unproven ones are refused and are rebuilt by the existing boot pass, reload, reconcile or os knowledge rebuild, never served through the old arm. On a proven source a hit the current recipe would not assemble from the live record is not served either (seat ruling S1 = B).
  • Card acceptance 3: no other arm changed; reverse pins above.
  • Seat conditions for B: (1) each fail-closed case pinned and ablated, as above. (2) The no-leak pin plus its ablation. (3) The indexStatus proof is kept beside the per-hit check rather than dropped. (4) Measurements above. (5) KNOWLEDGE_REBUILD_REQUIRED is kept with messages that say what ends each refusal, and the ledger is unchanged. (6) Withdrawn by the seat (it concerned a follow-up card). The ruling is recorded on this PR (7224861986); the PR keeps Clause-②: yes (narrowing) and Security-touching: yes, and lands the Tier H way through the seat.
  • The claim's :178 is not the arm: documentTitleField answering title for an object with no definition is the current assembly rule, so the gate keeps asking about it.
  • Narrowing, declared for the seat: for a non-system caller, a qualifying source is refused until a complete build under the current recipe has completed (for good under refresh.onRecordChange: false or an adapter missing indexStatus, completeBuild or listDocuments). On a proven source, a hit whose record changed after its document was written is dropped until the document is rewritten, and an adapter whose hits carry no docHash serves no hit from it (the built-in adapters carry it). Under buildAtBoot: false only the reconcile, where it runs, or os knowledge rebuild SOURCE ends the first.
  • Merged with main after knowledge_source: adapter becomes optional (the deployment's store), and a knowledge_source item mounts the knowledge service #37306 landed (f10feed). The one planSearches conflict keeps both intents: the adapter is the one the source binds to (main's optional-adapter placement) and the index-proof requirement stays on the admitted entry. Review point S5 is on top of it (3a69848): a source that needs the index proof is never searched without it. For every source, an adapter that registers mid-search is used from the next search on.
  • Deviation: with the shared verify lock held by sibling batteries through repeated 540 s queue-timeouts (five runs queued ahead at the last try), the package suite, typecheck, single-file runs, ablations and the measurement ran unlocked at --maxWorkers=2. The dogfood battery ran under the lock.

Verification

Read first: knowledge-service.ts dropUnverifiedHits (the per-hit check and its fail-closed exits), then planSearches, searchRound and unprovenIndex (the adapter resolved once, the refusal and the comparison), then knowledge-source-admission.ts mayServeEarlierRuleTitle (which sources pay either read).

Two minutes: pnpm --filter @objectstack/service-knowledge exec vitest run --maxWorkers=2 src/__tests__/knowledge-source-admission.test.ts shows 83 passed, including the per-hit check block.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/service-knowledge, touching 21 documentable anchor(s).

6 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/knowledge-rag.mdx (via KnowledgeService (symbol, a top-level class), KNOWLEDGE_REBUILD_REQUIRED (literal, a string literal in INDEX_NOT_PROVEN_CODE), sourceId (literal, a string literal in binding))
  • content/docs/api/data-api.mdx (via sourceId (literal, a string literal in binding))
  • content/docs/automation/flows.mdx (via sourceId (literal, a string literal in binding))
  • content/docs/kernel/runtime-services/sharing-service.mdx (via sourceId (literal, a string literal in binding))
  • content/docs/permissions/system-context.mdx (via admitSources (symbol, a method of class KnowledgeService), searchByKey (symbol, a method of class KnowledgeService))
  • content/docs/protocol/knowledge.mdx (via KnowledgeService (symbol, a top-level class), organizationIds (symbol, a field of interface AdmittedSource), KNOWLEDGE_REBUILD_REQUIRED (literal, a string literal in INDEX_NOT_PROVEN_CODE), sourceId (literal, a string literal in binding))

⛔ 3 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v18/18-0.mdx (via sourceId (literal, a string literal in binding))
  • content/docs/releases/v18/18-4.mdx (via sourceId (literal, a string literal in binding))
  • content/docs/releases/v18/18-6.mdx (via sourceId (literal, a string literal in binding))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 4 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 8d34c4404f951410083a6caebd6ad8003ea3423d → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 31213d0515d052791881e080ca1753caf80086bb — the merge of head 3a69848a551bdfa3ac7aa283f41f98902666febe into base 8d34c4404f951410083a6caebd6ad8003ea3423d, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 31213d0515d052791881e080ca1753caf80086bb && git checkout 31213d0515d052791881e080ca1753caf80086bb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8d34c4404f951410083a6caebd6ad8003ea3423d 3a69848a551bdfa3ac7aa283f41f98902666febe && git checkout -B drift-repro 8d34c4404f951410083a6caebd6ad8003ea3423d && git merge --no-ff 3a69848a551bdfa3ac7aa283f41f98902666febe

node scripts/docs-audit/affected-docs.mjs --json 8d34c4404f951410083a6caebd6ad8003ea3423d

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 8d34c4404f951410083a6caebd6ad8003ea3423d → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · head 458d4d9 · 2026-11-27T14:45Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 458d4d9cbce1424435d0960d533afea81c425ccd
Local-runs: none
Scope: packages/services/service-knowledge/src/knowledge-service.ts, packages/services/service-knowledge/src/knowledge-source-admission.ts, packages/services/service-knowledge/src/tests/knowledge-source-admission.test.ts + packages/services/service-knowledge/src/knowledge-index-fingerprint.ts, packages/services/service-knowledge/src/knowledge-service-plugin.ts, packages/spec/src/contracts/knowledge-adapter.ts, packages/plugins/knowledge-memory/src/index.ts, packages/plugins/knowledge-pgvector/src/pgvector-adapter.ts, packages/plugins/knowledge-turso/src/turso-adapter.ts (cited code, read only); the changeset and content/docs/protocol/knowledge.mdx read sentence by sentence as the caller asked

Inputs: card #37467 (body, triage 7185274073, first touch 7192256688, claim 7217130727, dev report 7221149374), PR #37963 (body, file list, net diff against main), the check-runs on the head. Nothing was built or run. One commit outside the shallow clone (9981f27, #37337) was fetched and read to settle the history question.

Verdict in one line: the arm is removed correctly and the predicate is exact, but the proof the removal rests on has two paths on which an index reports the current fingerprint and recipe hash while still holding a document with a title value, so this head is not safe to land as a field-gate change.

① Derived judgments

  • Accept-set at search, non-system caller, source where mayServeEarlierRuleTitle is true: was "searched when the caller may query title and every other served field"; is "searched when the caller may query every served field AND indexStatus reports the current fingerprint and recipe hash". Narrower for callers who may query title (refused 409 until proven), wider for callers who may not (served once proven). Named right in the Clause-② line, with the exceptions in S2.
  • Accept-set at search, every other source: unchanged. servedFieldsOf loses only the title add, and for a source outside the predicate that add was either absent (no title declared), removed again by the withheld set, or already present (display field is title, or the source lists it). Right.
  • Accept-set at save (admitAuthoredSource, ADR-0161 K4 guard two): an author who may not query a declared title the source does not index is now admitted. Wider; the display field, each content and metadataFields member and the where fields are still asked. Right, and it is the only widening at the save door.
  • Refusal surface: KNOWLEDGE_REBUILD_REQUIRED / 409 gains a second cause emitted by @objectstack/service-knowledge itself. The package already holds the code in packages/spec/src/api/error-code-ledger.zod.ts (:1674), so no ledger move is owed. Right.
  • Public exports: mayServeEarlierRuleTitle is exported from the module but not from src/index.ts; no package surface is added. servedFieldsOf has no reader outside the module. Right.
  • System context: admitSources returns before any proveIndex is set when ctx.isSystem, so no indexStatus read and no refusal. A caller with no context, or a service with no engine, is still searched nothing. Right.
  • Check-runs on the head: Lint and Repo Gates, TypeScript Type Check, Test Core 1 to 10 of 10, Build Core, Build Docs, Check Changeset, Governed Surface Queue Guard, PR-body guards, Spec property liveness, the Type Check lanes, Live E2E UI and Test UI all read success; the UI lanes and the Dogfood shards read skipped, as the dev report says.

② Semver level

  • '@objectstack/service-knowledge': patch with Metadata-protocol: none: right under AGENTS.md ("a non-protocol change, widening or breaking, ships patch and keeps its BREAKING banner and ADR-0087 disposition"). No key, accepted value or metadata type moves; the save door admits more authors, which is a permission answer and not a change to what a knowledge_source may say.
  • Clause-②: yes (narrowing) is one of the four readable spellings (scripts/pm/clause2-line.mjs: a diff that widens one surface and narrows another) and both halves are real here. The line is present, line-initial, in the PR body and the changeset. The claim on the card said Clause-②: no; the dev raised it, which is the correct direction.
  • The ! in the title and the BREAKING banner agree with the arm.
  • ADR-0087 marker not-required (no-migration-prescription): the reason sentence is true (nothing authored or stored is rewritten), and the gate read it green. The second BREAKING bullet does tell an adapter author to add two contract members; that is new code on an optional interface, not a rewrite of anything objectstack migrate meta reaches, so the category holds. See N4.
  • The content of the Clause-② line and the BREAKING bullets is not accurate as written: S2.

③ Boundary flags

  • open_questions: empty. security_findings: "none"; this record disagrees (M1, S1).
  • Out-of-scope note 1 (one indexStatus read per qualifying source per search, uncached): accepted. Caching would be wrong, since another node may rebuild or drop the index; the read is paid only where the predicate is true.
  • Out-of-scope note 2 (the package suite, the admission file, tsc and the seven ablations ran outside the verify lock at --maxWorkers=2): for the seat. The CI lanes on the head ran the same suite and read success, so the test verdict does not rest on the unlocked runs; the ablation counts do, and nothing in CI repeats them. The dogfood battery ran under the lock.
  • Premise correction (:178 stays, only :278 was the arm): correct. See ④ (d).
  • The card was triaged as "security behaviour unchanged, clean-up, p3". The PR that came out is a declared BREAKING narrowing of a field-level read gate. Whether the first-touch ruling covers that is the seat's to answer, not this record's.
  • SQL push-down: no new id materialisation and no in-app join. The added read is one adapter call per qualifying source.

④ Design judgment

M1 (must-fix) — a complete walk that purges nothing still records the recipe hash, so "current hash" does not prove "no earlier-rule document", and unprovenIndex accepts it.

  • Where: walkObjectSource, knowledge-service.ts:945 on the head: if (listed === undefined || cap !== undefined || (source.refresh?.onRecordChange ?? true) === false) return build ? this.completeBuild(...) : done;. With build true this is reached in two declared configurations, and in both completeBuild records ctx.index with no purge having run: (1) an adapter with indexStatus and completeBuild but no listDocuments (listAdapterDocuments answers { ok: false } with no reason, so listingNote is unset and the walk completes); (2) a source with refresh.onRecordChange: false on any adapter. The same two conditions stood at 9981f27 (:687 there), so every rh1 hash ever recorded is subject to them.
  • What stays behind: a document the walk did not see, that is, one whose row no longer matches the source's where. Such documents exist by design: a predicate write (multi: true) publishes a count and is not synced (plugin jsdoc, enableEventSync), a rolled-back write leaves one, and an opted-out source is never synced at all. If that document was assembled before fix(service-knowledge): search refills after the permission filter; a hit's title is the object's display field #37301 its title is the value of the field named title.
  • How it reaches the caller: chunk granularity is the default, and applyPermissionFilter (:2586) with liveTitles false asks only whether the caller can read the row by id. It does not re-ask where and does not compare docHash; that check lives only in answerByRecord. So a row that left where but is still readable passes, and the hit carries the stored title. The gate no longer asks about title, the proof reads "current", and a caller who may not query title is served its value. On main the arm refuses this caller.
  • Reach: the three built-in adapters all implement listDocuments, and none of them can hold an earlier-rule document in a searched index anyway (memory is rebuilt by the running code; pgvector was born in feat(knowledge): knowledge-pgvector, an open vector store on PostgreSQL, and the index fingerprint (#37100) #37337; Turso's generation tables postdate feat(knowledge): knowledge-pgvector, an open vector store on PostgreSQL, and the index fingerprint (#37100) #37337 and its earlier-release table is refused, never searched, then dropped at completeBuild). So the arm's whole protective value is for a persistent adapter outside this repo, and that is exactly the population path (1) reaches. The changeset's own second fix ("implement indexStatus and completeBuild on the adapter, then rebuild") walks such an adapter into path (1) if it has no listDocuments.
  • The claim this falsifies, as written in the module jsdoc, the changeset and the PR body: "a complete build rewrites each document whose title changed and purges the rest". The first half holds; the second holds only when the adapter lists and the source is synced. (A third, much narrower exception: purgeDocuments keeps a candidate whose row a re-read finds, and counts foreign ids as kept; the first needs a row to leave and re-enter where around the walk with no synced event, the second is not a document this service assembled. Named for completeness, not graded.)
  • A fix that keeps the head's shape: fail closed at the proof. unprovenIndex already has the adapter and the source; treat a source as unproven when the adapter has no listDocuments or the source has refresh.onRecordChange: false, with its own operator sentence, and pin both. That makes those sources permanently refused for non-system callers, which is a further narrowing the changeset must then state. The alternative is to make the default-granularity filter drop a hit whose row no longer matches where for a proveIndex source. Which of the two is the dev's and the seat's call; the head as it stands is neither.

S1 (should-fix) — the recipe hash names what the last complete build walked under, not what later writes were made under, so a write between builds under another title field survives a return to the recorded recipe.

  • Where: writeSynced (:2174) and repairStale write through recordToDocument with the schema as it reads at that moment, into the active generation; no adapter compares or records the recipe hash on upsert. An object definition changing at runtime starts no rebuild (buildReloadedSource is called only for a knowledge_source item, knowledge-source-loader.ts:227); the next boot pass is what would notice.
  • Path: display field name, index built, hash R recorded. The object's nameField is set to title; records touched in that window are synced with title values as their document title. nameField is set back to name before any boot. planIndex computes R again, indexStatus still reports R, the source reads proven, and those documents are served at chunk granularity to a caller who may not query title. On main the arm refuses that caller. The same shape is reachable by a node still running pre-fix(service-knowledge): search refills after the permission filter; a hit's title is the object's display field #37301 code beside an upgraded one during a rolling deploy.
  • This is far narrower than M1 and may be accepted rather than closed, but it is the "event-sync write between builds" case and the proof text claims more than it delivers. Either close it or say it: a sentence in the module jsdoc and in knowledge.mdx that the proof covers what the last complete build walked, plus a follow-up card for chunk-level freshness, would be an honest floor. The seat should rule which.

S2 (should-fix) — the changeset's first BREAKING bullet and its fix are false for two declared configurations, and the Clause-② line omits them.

  • "The boot's build pass builds a source whose index records no recipe hash or another one ... Fix: none is owed for a built-in adapter (memory, pgvector, Turso)". buildIfDue (:1384) returns before reading anything for a source with refresh.onRecordChange: false, at boot and on reload; and KnowledgeServicePluginOptions.buildAtBoot: false turns the whole pass off (plugin :565, and buildOnReload at :779). In both, on a built-in adapter, a qualifying source stays refused for every non-system caller until an operator runs os knowledge rebuild; on the memory adapter that repeats at every restart. For an opted-out source the rebuild is also the service writing an index the source declares an external indexer owns, and that indexer never calls completeBuild, so the refusal is in practice standing.
  • These are prose faces, so the fix does not move code: name both configurations in the bullet, give os knowledge rebuild as the owed fix for them, and carry the same two into the Clause-② line's "until a complete build of the source has completed" and into the knowledge.mdx paragraph. If M1 is closed by failing closed, this text changes again with it.

S3 (should-fix) — the refusal's message and the operator line promise a rebuild will end a refusal that, on two adapter shapes, no rebuild can end.

  • Caller-facing message (planSearches): "needs a rebuild ... It answers again once a complete rebuild of the source has completed." Operator warn line: ends "... once a complete build under the current recipe has completed (os knowledge rebuild)." Both are emitted unchanged when the reason is "the adapter reports no index status" (rebuilding changes nothing), and when the adapter has indexStatus but no completeBuild, where unprovenIndex says "the index records no recipe hash: no complete build of it has completed" although any number of complete walks may have run. readIndexStateOf (:1115 to :1124) already tells these two apart and says "nothing is rebuilt automatically"; the search-time text should say as much, so an operator does not loop on rebuilds. The permanence itself is correct and fails closed; only its statement is wrong.

Answers to the points asked, where not already above.

(a) The proof, step by step.

  • Recorded only by post-fix(service-knowledge): search refills after the permission filter; a hit's title is the object's display field #37301 code: holds. GitHub compare of 039b288 against 9981f27 reads ahead 34, behind 0, so fix(service-knowledge): search refills after the permission filter; a hit's title is the object's display field #37301 is an ancestor of feat(knowledge): knowledge-pgvector, an open vector store on PostgreSQL, and the index fingerprint (#37100) #37337. At 9981f27 documentTitle already reads record[documentTitleField(schema)], and knowledge-index-fingerprint.ts is added by that commit. TITLE_RULE_VERSION has been 1 since, and the hash body carries the resolved title field name, so a changed display field changes the hash.
  • Recorded only at completion: holds for all three built-in adapters. memory completeBuild (:135), pgvector completeBuild and Turso completeBuild (:640) are the only writers of the recipe hash; beginBuild and upsert write none. indexStatus in each reports the ACTIVE generation's values, which is the generation a search reads.
  • Partial build (limit), dryRun: build is false, no beginBuild, no completeBuild. Holds.
  • A build that did not complete: every early return (fence stop, failed read, failed upsert, failed listing, purge failure, lease lost before completion) returns without completeBuild; a completeBuild that throws leaves the adapter's record as it was. Holds. During a rebuild inside the same generation the old hash is reported until completion, so the source stays refused throughout.
  • docHash covers the title (computeDocHash: content, title, metadata, organization), and a listed hash that is absent or different is rewritten. Holds.
  • "Purges every document it did not walk": does not hold. M1.
  • Event-sync and repairStale writes between builds: made by current code under the recipe as it reads then; not tracked against the recorded hash. S1.
  • Another adapter's completeBuild recording the hash without purging: this is M1 path (1).
  • Per search, non-system only: yes. proveIndex is set in admitSources after the system return; planSearches runs once per searchByKey and reads indexStatus with no cache. The refill round reuses the proven list without a second read, which is sound: the only way an index moves between rounds is toward a newer build, and an adapter that switched generations refuses the refill itself.
  • Search never starts a build: by construction. planSearches calls planIndex (settings and schema reads) and adapter.indexStatus, nothing else; the three built-in indexStatus bodies read generation rows and write nothing.

(b) mayServeEarlierRuleTitle is exact. On main the arm added title when the fields cannot be enumerated or declare title, then the withheld set removed it; it changed the answer only when title was not already served. The predicate is that condition term for term: not declared returns false, withheld returns false, already served (display field is title, no definition so the title field is title, or listed in content or metadataFields) returns false. No false negative found. False positives (fields not enumerable, no display field resolved, a deployment with no security service where every caller may query title) cost one read or a refusal, never a leak. The schema it reads (objectAdmission.schema, from engine.getSchema) is the one planIndex hashes (schemaFor, the same call).

(c) Permanent refusal: correct in code, fails closed (no indexStatus, or one that throws, or no completeBuild so no hash is ever recorded). Stated correctly in the changeset's second bullet and Clause-② line; stated incompletely in knowledge.mdx (N3) and wrongly in the runtime text (S3).

(d) documentTitleField answering title for an object with no definition (main :178) is the current assembly rule: recordToDocument reads title there too and the recipe hash names it. It stays, rightly. Only the served.add('title') at main :278 was the arm. The save-side widening is right: a save is judged on what the source will index under the current rule, and no index of a source being saved needs the arm. Nothing else widens at the save door.

(e) Every other arm unchanged: the diff to servedFieldsOf removes the declared read and the one add; selectingFieldsOf, admitSourceFields, admitObject, the withheld set and applyPermissionFilter are untouched. The three proven-index reverse pins hold the display field, a content field and a metadataFields field.

(f) Changeset and docs, beyond S2.

  • Summary line and the closing paragraph: accurate apart from "and purges the rest" (M1).
  • Clause-② line: the predicate, the code, the whole-refusal case, the permanence and the save widening are each stated correctly. It says "the object's display field is another field"; the predicate is also true when no display field resolves or the fields cannot be enumerated. N3.
  • knowledge.mdx 3.2 paragraph: correct on the proof and the code. "The boot's build pass or os knowledge rebuild builds it" is true as an either-or. The last sentence covers no indexStatus and omits no completeBuild. The field-rules bullet correctly drops "and a declared title field".
  • content/docs/ai/knowledge-rag.mdx :297 still gives one cause for the code. N2.

(g) Tests. The refusal is pinned five ways with code and status, for a caller who may and one who may not query title, with the adapter never searched. The proof path is pinned (served, indexStatus read once; refused, rebuilt, current, served). The system bypass is pinned inside each unproven case. The no-read case is pinned (indexStatus not called for three non-qualifying sources). The predicate table has seven rows covering each term. Not pinned: that a refused search starts no build (N1), and either M1 configuration (the stateful stub lists an empty index and no case completes a walk without a purge). The ablation counts are plausible against the cases but were measured outside the lock and are not re-run by any check-run; they are the dev's reading, not a gate verdict.

(h) Ordering against #37306. Three parts of this reasoning read planSearches as it stands and need a second look at the merge: the adapter whose indexStatus is read must be the adapter searchRound then searches, so both lookups must resolve through the same binding once boundAdapterId lands; the !adapter branch pushes the entry with no proof, which is safe only because searchRound refuses an unmounted adapter and never falls back to another; and the destructure that strips proveIndex must survive the hunk so the flag is neither lost before the check nor carried into SearchTarget. The whole-refusal test (first.size === 0 and refused.length above 0) also depends on planSearches filling the same refused array before the first round.

N1 (nit) — no case asserts that a refused search calls neither beginBuild, upsert nor completeBuild; one line in the stateful case before the rebuild would pin "search never starts a build".
N2 (nit) — content/docs/ai/knowledge-rag.mdx :297 says a search answering KNOWLEDGE_REBUILD_REQUIRED "says the source is being rebuilt"; the code now has a second cause and the page does not name it.
N3 (nit) — the Clause-② line and the knowledge.mdx paragraph describe the qualifying source more narrowly than the predicate (they omit an object whose fields cannot be enumerated or that resolves no display field, and the doc omits the no-completeBuild adapter).
N4 (nit) — the ADR-0087 marker holds, but its reason could say in so many words that the adapter author's fix is new code on optional contract members and not a rewrite, since the body does carry a "Fix:" aimed at a consumer.
N5 (nit) — the reflowed field-rules bullet in knowledge.mdx leaves one over-long line.

Implemented-by: claude/area-o1C-37467
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): REWORK at head 458d4d9cbce1424435d0960d533afea81c425ccd (Fixes #37467). Full read · 2026-11-27T14:57Z

席位核对

Shape and gates. l1-face --pr 37963: one flag, dogfood owed. The dev report's battery is 490 of 493 files with 3 skipped, so that flag is met. Check-runs at 458d4d9: 40 success, 15 expected skip, 0 failed. ! title, Clause-②: yes (narrowing), Metadata-protocol: none, so a contract review is owed.

Contract review. Record 7221441058 at this head is a FAIL, served at the contract tier (verify-review-tier PASS): M1, plus S1, S2 and S3. I adopt it. What holds: the predicate mayServeEarlierRuleTitle matches the old arm term for term, #37301 is an ancestor of #37337 so no recipe hash was ever recorded by code that wrote title, the system bypass and the no-build-on-search are by construction, and every other arm of the gate is unchanged.

Owed before ACCEPT.

  1. M1, the proof does not hold on two paths. I confirmed the line: at knowledge-service.ts:945 on this head, walkObjectSource calls completeBuild with no purge when the adapter has no listDocuments (listed === undefined) or the source has refresh.onRecordChange: false. The recipe hash is then recorded although documents the walk did not see, such as a row that left where through a predicate write, keep an earlier-rule title. At chunk granularity those hits reach a caller who may not query title. The record gives two shapes of fix. Pick one and pin it. The record's own lean is to fail closed in unprovenIndex for those two source shapes, which the changeset must then state as part of the narrowing.
  2. S1, writes between builds. A display-field change and change-back at runtime leaves event-synced documents of the middle window under a hash that reads current. It is much narrower than M1. Either close it, or state it as the proof's limit in the module jsdoc and knowledge.mdx and file a follow-up card for chunk-level freshness. I accept the second. Say which in the PR body.
  3. S2, the first BREAKING bullet. "Fix: none is owed for a built-in adapter" is false for a refresh.onRecordChange: false source and under buildAtBoot: false. Neither is built by the boot pass, so both stay refused until os knowledge rebuild. Name both in the bullet, the Clause-② line and knowledge.mdx, and re-read all three after item 1.
  4. S3, the runtime text. The refusal message and the warn line promise a rebuild ends the refusal, but with no indexStatus or no completeBuild no rebuild can. Say so in each case, as readIndexStateOf already does.

Nits N1 to N5 are optional. N1, one assertion that a refused search writes nothing, is cheap and worth taking.

For the seat. The card was triaged as a p3 clean-up with security behaviour unchanged, but the PR is a BREAKING narrowing of a field-level read gate. The seat should confirm the first-touch ruling still covers it. The dev report's security_findings: none should be corrected after M1.

Ordering. The area expects this branch to merge main after #37306 lands. Make the rework and that merge one new head if the timing allows, and I will do one delta read with a delta contract review on it. The record's point (h) lists what to recheck in planSearches at that merge.

…ng; word each refusal by what ends it

Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-authored-by: Claude <noreply@anthropic.com>
… live record

A proven index speaks for the index as its last complete build left it, not
for a document the build's purge left in place or one written after it. Each
hit of a source searched on that proof is now served only when its record
still belongs to the source and the stored docHash is the one the current
recipe assembles from the record as it reads now: one system-context read per
source per search round. Every way the check cannot be made drops the hit:
the read fails or answers no list, the hit names no record or carries no
hash, the hash cannot be computed, the tenancy posture cannot be read. The
read decides survival only; nothing it returns is put on a hit.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · head 7def462 · 2026-11-27T17:43Z

…from the record's current build inputs is dropped; name the docHash adapter requirement

Changeset: an adapter whose search hits carry no docHash serves no hit from
a source checked per hit; the built-in adapters return it.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7def462c5c0c9b9bf92938f7e39a660b734a35d6
Local-runs: none
Scope: packages/services/service-knowledge/src/knowledge-service.ts, packages/services/service-knowledge/src/knowledge-source-admission.ts, packages/services/service-knowledge/src/tests/knowledge-source-admission.test.ts + packages/spec/src/contracts/knowledge-adapter.ts, packages/services/service-knowledge/src/knowledge-service-plugin.ts, packages/plugins/knowledge-memory/src/index.ts, packages/plugins/knowledge-pgvector/src/pgvector-adapter.ts, packages/plugins/knowledge-turso/src/turso-adapter.ts (cited code, read only); the changeset, content/docs/protocol/knowledge.mdx and content/docs/ai/knowledge-rag.mdx read sentence by sentence as the caller asked

Delta round on the record in comment 7221441058 (head 458d4d9). Inputs: card #37467 (body and every comment, dev report 7224693678 included), PR #37963 (body, file list, net diff against main at merge base 9a274e6), the check-runs on the head. Nothing was built or run. The delta is commits 9756f2b and 7def462 on top of merge 054a8c5.

The merge: the PR's own diff of its six files against the merge base reads line for line the same before the merge (458d4d9 against 1b57f36) and after it (054a8c5 against 9a274e6), 412 changed lines each. The merge resolved nothing in the PR's hunks. #37306 is not in this head (no boundAdapterId on main), so the recheck the earlier record's point (h) asks for is not yet due; what can be read of it now is under S5.

Closures of the earlier record's findings.

M1 (must-fix): closed

unprovenIndex now answers never, before any read, for a source with refresh.onRecordChange: false and for an adapter with no listDocuments, so neither path of walkObjectSource that records the hash without a purge can prove a source. Both are pinned (the no-list row and the opted-out case, the latter asserting indexStatus is not called). The third, ungraded exception (a purge candidate kept, a foreign id) is covered by the per-hit check: the hash comparison for the first, the document-id comparison for the second.

S1 (should-fix): closed

Closed by the seat's option B as the PR body restates it: dropUnverifiedHits recomputes each hit's docHash from the live row under the object definition as it reads at search time, so a document written in a window under another title field is dropped and repaired, whatever the recorded recipe hash reads.

S2 (should-fix): closed

The first BREAKING bullet names buildAtBoot: false and what builds the source there; refresh.onRecordChange: false has its own bullet with a fix; the Clause-② line and the knowledge.mdx paragraph carry both. Read against buildIfDue, reconcileExclusion and the plugin's buildOnReload: this.options.buildAtBoot !== false: each sentence holds.

S3 (should-fix): closed

The caller sentence and the operator sentence are chosen by what ends the refusal (rebuild, never, unreadable); the four never shapes promise no rebuild, pinned in the table for both texts.

N1 (nit): closed

N2 (nit): closed

N3 (nit): closed

N4 (nit): closed

N5 stays as it was (one over-long line in the field-rules bullet of knowledge.mdx); it is carried below as N6.

① Derived judgments

  • Accept-set at search, non-system caller, qualifying source: narrower again than at the earlier head, and named. Never searched for refresh.onRecordChange: false or an adapter missing any of indexStatus, completeBuild, listDocuments. On a proven source, a hit is served only when the system read where AND id in (the hits' record ids) answers its record, its documentId equals documentIdFor(source, record), and its stored docHash equals the recompute. Right, and each is in the Clause-② line.
  • Accept-set for every other source and for the system context: unchanged. verified is built only from targets carrying verifyHits, which only a proveIndex entry gets, which only a non-system admission sets; served returns the list untouched when the set is empty.
  • Hit shape: unchanged. dropUnverifiedHits returns members of the list it was given, by identity (passed is a set of the hit objects); no field of a read row is copied. Right (condition 2).
  • Refusal surface: the code and status are unchanged; three caller sentences replace one. No ledger move. Right.
  • Public exports and contract: none added. IKnowledgeAdapter is unchanged; a hit's docHash stays optional in the contract and becomes required in effect for a qualifying source. That effect is stated in the Clause-② line ("no stored hash") and is owed as a BREAKING bullet, see ②.
  • Background writes: a non-system search of a proven source can now start repairStale at chunk granularity, where before only the record-level path did. Same single-flight path, never for an opted-out source (those are never proven). Right.
  • Check-runs on the head: 40 success, 17 skipped, none failed or pending at the time of reading. Test Core 1 to 10, Lint and Repo Gates, TypeScript Type Check, the Type Check lanes, Build Core, Build Docs, Check Changeset, PR-body guards, Governed Surface Queue Guard, Spec property liveness, Dogfood Regression Gate, Test UI and Live E2E UI read success.

② Semver level

  • '@objectstack/service-knowledge': patch, Metadata-protocol: none, Clause-②: yes (narrowing) in the PR body and the changeset, the ! title, the BREAKING banner and the ADR-0087 marker: unchanged in kind and still right. The marker's reason now says the adapter author's fix is new code on optional members.
  • Clause-② line, sentence by sentence against the code: the predicate (three ways the display field is not title), the proof and "the builds that record that hash purge", the whole refusal, what builds the source on a built-in adapter and under buildAtBoot: false, the four standing cases, the per-hit check and its five undecidable cases, the save widening. Each holds.
  • BREAKING bullets one to four: each holds against the code, with N7.
  • Owed, declared by the dev report and not on this head: a bullet saying that an adapter whose hits carry no docHash serves no hit of a qualifying source, with the fix (return the stored hash on each hit, ADR-0161 K8 item 3). The three built-in adapters return it (memory :253, pgvector :642, Turso :590) and write it in the same statement as the title and content. Deferring it to the next head of this PR is acceptable because that head exists before anything merges (the knowledge_source: adapter becomes optional (the deployment's store), and a knowledge_source item mounts the knowledge service #37306 merge) and is read again; it is not acceptable for it to be absent from the head that lands, since the bullet list is what an adapter author reads and the Clause-② line alone buries it. Not graded on that understanding; the next round checks it is there.

③ Boundary flags

  • open_questions: empty.
  • security_findings: "withheld" in the dev report: this record cannot judge what it cannot read. For the seat.
  • Out-of-scope note 1 (the docHash bullet): answered in ②.
  • Out-of-scope note 2 (suite, typecheck, ablations and the measurement run outside the verify lock): for the seat, as before. The CI lanes ran the suite on the head. The ablation results and the measurement table are the dev's reading; no check-run repeats them, and the measurement file was deleted, so condition 4 is met as a reported reading and not as a reproducible one.
  • The seat's ruling S1 = B and its conditions are not on the card or the PR thread; they are read here as the PR body restates them. Conditions 3 (the indexStatus proof kept beside the per-hit check), 5 (the code kept, each message saying what ends it) hold in the tree. Condition 2 holds in the tree and is pinned. Condition 1 holds except for S4.
  • SQL push-down: the new read is one find per proven source per round, where AND id in, projected by freshnessFields. The ids come out of the vector store's answer, so there is no SQL to push the membership into; no in-app join. Under record granularity the same records are then read a second time by checkFreshness (N8).

④ Design judgment

The narrowing still makes the spec's own refusal real and takes no declared capability away at a consumer: the field gate's other arms stand, and the two new refusals (unproven source, unverified hit) fall on content the service cannot show to be assembled under the current recipe.

Attempts to break dropUnverifiedHits, and what each found.

  • Other adapters: a hit is kept only with a stored hash equal to the recompute, so an adapter that returns none, or an empty one, serves nothing from a qualifying source. An adapter that returns a hash it did not store with the passage is outside what the service can check; the three built-in ones write doc_hash, title, content and metadata in one statement, the unchanged-text branch included.
  • A hit naming another source: dropped earlier, in searchRound (hit.sourceId === source.name), so the verified lookup by hit.sourceId cannot be sidestepped by a hit under another name.
  • Chunk against document ids: the comparison is on documentId, per hit; two passages of one record with different stored hashes are judged apart, the recompute done once per record.
  • Title in the hash: computeDocHash covers content, title, metadata and the organization. An earlier-rule document passes only if its title equals the display field's current value, in which case nothing the gate did not ask about is served.
  • The where filter: the read carries { $and: [where, id in] }; a row outside where is absent from the answer, the hit is dropped and the repair removes the document. See S4 for its pin.
  • More than 100 hits: one read, all distinct ids, no page limit set; a row the engine does not return reads as absent and drops the hit. Fails closed.
  • Error paths: no engine, an unreadable posture, a source no longer registered or not an object source, a read that throws or answers no list, a row with no usable id, a recompute that throws. Each drops. A throw from the function itself fails the search. The set is complete for the function as written.
  • A running build: on a generation-keeping adapter the search reads the active generation the status spoke for; a switch between the two reads moves to a newer build, and the per-hit comparison holds either way.
  • Record granularity: applyPermissionFilter with live titles runs first and may replace a hit's title with the caller's own read of the display field, as on main; the per-hit check then runs on the same objects and adds nothing.
  • Does the read reach the hit: no. Rows feed recordToDocument(...).docHash and nothing else; log lines carry counts, the source's face and an error text, to the operator only.

S4 (should-fix) — two legs of the per-hit check are stated and wired, and neither is pinned, so condition 1 is not met for them.

  • The where conjunct. Every per-hit case uses a source with no where; CONTROL asserts the read's where matches { id: { $in } } only, and the "outside the source's where" case is simulated by the engine double returning no row, which never looks at the query. Replace { $and: [objSource.where, byId] } by byId and the file stays green. The docs and the changeset both promise it ("the record still belongs to the source, its where included").
  • The refill round. The stub adapter answers one hit, so no case reaches the second served(...) call (refilledKept). Remove it there and the file stays green, and on that mutation an unchecked hit of a proven source is served. The "check not wired" ablation in the PR body does not show which call site it removed.
  • Owed: one case with a where source asserting the system read's query is the conjunction, and one case that saturates the first round on a proven source and shows a hit with a stale hash in the refill is dropped; each with its ablation named.

S5 (should-fix) — the requirement to prove and verify a source is not carried through every branch of the search plan; one branch drops it and relies on a later, separate lookup giving the same answer.

N6 (nit) — the field-rules bullet in knowledge.mdx still has one over-long line.
N7 (nit) — "the search repairs it in the background" (docs) and "the search starts that repair" (changeset) are true for a stale or missing record's own document; a document under a foreign id is dropped and not repaired, and a repair is tried once per document until a later search finds it current.
N8 (nit) — under record granularity a proven source's records are read twice, once by the per-hit check and once by checkFreshness; the PR body's "one read per proven source per round" is true of the new check alone.
N9 (nit) — the debug line "the permission re-check removed N hit(s) this caller may not read" now also counts hits the per-hit check dropped.

Implemented-by: claude/area-o1C-37467
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3 (isolated sub-agent)

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): REWORK at head 7def462c5c0c9b9bf92938f7e39a660b734a35d6 (Fixes #37467). Delta read · 2026-11-27T17:49Z

席位核对

Contract review. Delta record 7224831967 at this head: PASS at the contract tier (verify-review-tier PASS). It closes M1, S1 (B, under the seat's conditions), S2 and S3, and the nits from the earlier record. It raises two new graded findings, S4 and S5, which the queue guard reads as open. I adopt it. Check-runs at 7def462: 40 success, 17 skipped, 0 failed.

The next head owes, beside the pin and BREAKING bullet already in progress:

  • S4. Two legs of the per-hit check have no pin: the source's where conjunct in the per-hit read, and the refill-round call site. Add one pin and one named ablation for each (condition 1).
  • S5. On every path out of planSearches, a source admitted with the proof requirement keeps it or is refused. And the adapter the proof was read from is the same adapter the round searches. It is the same hunk the knowledge_source: adapter becomes optional (the deployment's store), and a knowledge_source item mounts the knowledge service #37306 merge rewrites, so it belongs on that head, with a pin.
  • The deferred BREAKING bullet (an adapter whose hits carry no docHash serves no hit from a qualifying source) must be on the head that lands.

Nits N6 to N9 are accepted, or fixed on the prose faces if the head moves anyway.

Next: the new head, then a delta L2, a delta L1, and the seat's Tier H handoff. The planSearches recheck (earlier point (h)) runs on the head that carries the #37306 merge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Seat ruling on record · 2026-11-27T17:51Z · PR #37963 (card #37467) · contract review 7221441058, S1

The seat ruled S1 on 2026-11-27T16:01Z to area o1-C; it is recorded here so the PR thread carries it, not only the PR body's restatement.

Ruled: B — strict per-hit freshness, in this PR. It closes S1 fail-closed with no contract change. A (a contract change) needs the maintainer and is not taken; C stays the fallback if B does not hold in review. The PR keeps Clause-②: yes (narrowing), lands the Tier H way through seat repo:objectstack#1, and records Security-touching: yes.

Conditions:

  1. Every failure drops the hit, never passes it: a failed or non-list system read, a missing stored hash, a hash that cannot be recomputed, an unreadable posture. Each case pinned.
  2. The system read decides only whether a hit survives; nothing it reads reaches the caller.
  3. The indexStatus proof is dropped only if the PR shows, case by case, that the per-hit check covers every M1 shape, with the L2 delta confirming it and that neither M1 nor S1 survives; otherwise the proof stays beside B. (The head keeps the proof beside B.)
  4. The extra read is measured, one round at a small and a large hit count, latency and rows read, with the numbers and the method in the PR body.
  5. Where a refusal remains, KNOWLEDGE_REBUILD_REQUIRED stays and its message says only what ends it; no liveness-ledger change in this PR.
  6. Withdrawn; it concerned a follow-up card whose disposition is with the maintainer.

…d its refill round

The system read of a source with a `where` asks for the conjunction of the
`where` and the hits' ids, and a record outside it is dropped; a hit the
refill round answers is checked as the first round's are. Docs and the
changeset say which documents the search repairs; the debug count names
both checks; one over-long docs line rewrapped.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · head 8979fd3 · 2026-11-27T18:49Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 8979fd3768adaf6d934bb7813a21826249514800
Local-runs: none
Scope: packages/services/service-knowledge/src/knowledge-service.ts, packages/services/service-knowledge/src/knowledge-source-admission.ts, packages/services/service-knowledge/src/tests/knowledge-source-admission.test.ts + none new (the cited code read for the record in 7224831967 is unchanged); the changeset and content/docs/protocol/knowledge.mdx read sentence by sentence as the caller asked

Delta round on the record in comment 7224831967 (head 7def462). Inputs: card #37467 (every comment, dev report 7225887659 included), PR #37963 (body, the seat ruling 7224861986 on its thread, the diff from 7def462 to this head and the net diff against main), the check-runs on the head. Nothing was built or run. The delta is commits 0d7fe5c and 8979fd3: four files, no merge, 73 lines added and 10 removed.

S4 (should-fix): closed

Both legs are now pinned, and each named ablation turns its case red by construction, read off the test code.

  • The where conjunct. The case registers a source with where: { status: 'open' } and runs it with the live row reading open and then closed. The engine double now applies an equality conjunct only when the query carries it inside $and. With the conjunct replaced by the id list alone, the closed row is answered, its hash matches, the hit is served and toEqual([]) fails; the assertion on the first system read's where ({ $and: [where, { id: { $in: ['rec_1'] } }] }) fails as well. The open run is the control.
  • The refill round. With topK: 1 the first round asks 5 and is answered 5 hits with a stale hash, so nothing survives and the source is saturated; the refill asks 20 and answers the same five (score 0.9) plus one current hit (score 0.1). asked is pinned to [5, 20], so the case cannot pass without the refill running. With the check removed at the refilledKept call site alone, the six hits pass the permission filter, the sort puts a stale one first and the answer is not ['rec_1']. The PR body now names the call site of each ablation (first round alone, refill alone, both).
  • The third new case (a document synced while the display field was title, its hash computed under that definition) asserts the hit is dropped and the earlier title is absent from the answer. It pins the window case the seat's option B exists for by its rule and not by a made-up hash string.

S5 stays open as recorded in 7224831967. It is not in this head by design: it belongs to the head that carries the #37306 merge, and that head is read again. This record neither closes nor re-reads it.

N6 (nit): closed

N7 (nit): closed

N9 (nit): closed

N8 is answered in the PR body (under record granularity checkFreshness reads the same records again, so "one read" is the new check's own cost); accepted as stated.

① Derived judgments

  • Accept-sets, hit shape, refusal surface and exports: unchanged from 7def462. The one source line that moved is the debug text counting removed hits, which now names both checks; no branch, value or log level changes. Right, and it is only what it claims.
  • The test double's find reads ids out of either where.id.$in or the id conjunct of $and, for system and caller reads alike. No earlier case passes a $and, so no earlier case changes meaning.
  • Check-runs on the head: 41 success, 17 skipped, none failed; Check Changeset was running again after the PR body edit when read (its earlier run on this head read success). Test Core 1 to 10, Lint and Repo Gates, the Type Check lanes, Build Core, Build Docs, PR-body guards and the Governed Surface Queue Guard read success. The dogfood battery was not re-run by the dev on this head (tests, prose and one log string moved); the CI gate on the head read success, and the battery is owed on the merge head.

② Semver level

  • Unchanged: patch, Metadata-protocol: none, Clause-②: yes (narrowing), the banner and the ADR-0087 marker.
  • The owed BREAKING bullet is on this head, and it is true and complete for what it covers: dropUnverifiedHits keeps a hit only when docHash is a non-empty string, so an adapter that returns none serves no hit of a qualifying source; the three built-in adapters return the stored hash on every hit; the fix names the member and ADR-0161 K8 item 3. A hit must also name its record and carry the derived document id, but those were required of an object source's hit before this PR and are not part of its narrowing.
  • The second bullet's new clause (repair for the record's own document, once per document until a later search finds it current, a foreign id dropped and not repaired) matches repairStale and the continue ahead of it.

③ Boundary flags

  • open_questions: empty. security_findings: "withheld": for the seat, as before.
  • The seat's ruling is now on the PR thread (7224861986). Read against it: condition 1 holds with S4 closed; 2, 3 and 5 hold as at the earlier head; 4 is met as the ruling words it (numbers and method in the PR body, re-run by the dev: 5, 25 and 100 hits, one round trip each, p50 1.5, 3.3 and 9.2 ms); 6 is withdrawn by the seat.
  • Out-of-scope note (suite, typecheck, ablations and measurement run outside the verify lock): for the seat. The CI lanes ran the suite on the head; the ablation results remain the dev's reading, now checkable against the test code as above.
  • SQL push-down: nothing new.

④ Design judgment

Nothing in the design moved. The knowledge.mdx edits are true: the repair sentence matches the code as in ②, and the field-rules bullet is a rewrap with no word changed. No new finding on this head.

Implemented-by: claude/area-o1C-37467
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3 (isolated sub-agent)

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): REWORK, S5 only at head 8979fd3768adaf6d934bb7813a21826249514800 (Fixes #37467). Delta read · 2026-11-27T18:51Z

席位核对

Contract review. Delta record 7225940231 at this head: PASS at the contract tier (verify-review-tier PASS). I adopt it.

  • S4 is closed. The where conjunct pin uses a source with where: { status: 'open' } and an engine double that applies it only inside $and. The refill pin uses topK: 1 with asked pinned to [5, 20], and a stale hit would rank first if the refill-site check went. Both named ablations go red by construction.
  • The rule-named docHash pin, the no-docHash BREAKING bullet and the docs repair sentences are true. The knowledge-service.ts change is the debug string only. N6, N7 and N9 are closed and N8 is answered.
  • Read against seat ruling 7224861986, conditions 1 to 5 hold.

Still open: S5 only. By the area's plan it lands on the head that carries the #37306 merge, after #38026 merges, with its pin and the dogfood battery on that head. Check-runs at 8979fd3: 41 success, 17 skipped, 0 failed, Check Changeset green.

Next: the merge head with S5, then a delta L2 on S5 and the planSearches recheck (earlier point (h)), a delta L1, then the seat's Tier H handoff.

Resolved in planSearches: the adapter is the one the source binds to
(boundAdapterId, main's optional-adapter placement), and the index-proof
requirement is kept on the admitted entry.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…searched without it

The adapter a source binds to is resolved once per search, in the plan: the
index proof is read from that instance, both search rounds search that
instance, and a source whose adapter does not resolve at the plan carries
the coded refusal and is refused, never searched.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 3a69848 · 2026-11-27T21:44Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3a69848a551bdfa3ac7aa283f41f98902666febe
Local-runs: none
Scope: packages/services/service-knowledge/src/knowledge-service.ts, packages/services/service-knowledge/src/knowledge-source-admission.ts, packages/services/service-knowledge/src/tests/knowledge-source-admission.test.ts + packages/plugins/knowledge-pgvector/src/pgvector-adapter.ts, packages/plugins/knowledge-turso/src/turso-adapter.ts, packages/plugins/knowledge-memory/src/index.ts (cited code as the merge left it, read only); the changeset, content/docs/protocol/knowledge.mdx and content/docs/ai/knowledge-rag.mdx re-read against the merged tree

Delta round on the record at head 8979fd3, which followed the record in comment 7224831967 and left S5 open. Inputs: card #37467 (every comment, dev report 7228689908 included), PR #37963 (body, thread, the diff from 8979fd3 to this head and the net diff against main at 8d34c44), the check-runs on the head. Nothing was built or run. The delta is merge f10feed (main at 8d34c44, carrying #37306 through #38026) and commit 3a69848.

The merge, read on its own. The PR's own diff of its six files reads line for line the same before the merge (8979fd3 against 9a274e6) and after it (f10feed against 8d34c44), 920 changed lines each. The one conflict, in the planSearches loop, keeps both sides: this PR's destructure that takes the proof requirement off the admitted entry, and main's resolution of the adapter through the source's binding (boundAdapterId) in place of the name the source carries. Neither intent is lost at f10feed. Every other hunk of this PR in knowledge-service.ts (the per-hit check, unprovenIndex, the refusal texts, admitSources) merged without change.

S5 (should-fix): closed

The rule now holds in the tree: a source admitted with the proof requirement keeps it or is refused on every path out of planSearches, and the adapter the proof is read from is the adapter the rounds search.

  • planSearches resolves the binding once per source per search (adapterIdFor, then getAdapter). A resolution that throws puts the coded refusal on the target; the target carries no instance, and searchRound names it in refused and continues. No branch pushes a target that can be searched without having passed the proof step when the proof was required.
  • planIndex returns the instance it was handed, unprovenIndex reads indexStatus from plan.adapter, and the target stores that same instance in binding. searchRound takes the instance from binding and looks nothing up; the refill round is given a subset of the same targets, so it searches the same instance too.
  • verifyHits is set on exactly the targets that passed the proof, so the per-hit check still covers every hit such a source can answer.
  • Pins: one case swaps the instance under the same id while the proof is being read and asserts the proven instance is the one searched and the other is never called; one registers a source's adapter only after that source was planned and asserts the source is refused SERVICE_UNAVAILABLE / 503 with neither search nor indexStatus called on it. A round that looked the adapter up again would call the other instance in the first and search the late one in the second, so both turn red by construction.
  • Side effect, stated by the area and accepted: an adapter that registers during a search is used from the next search. This holds for every source, not only those needing the proof; the refusal it produces is the one main already answers for an unmounted adapter.

① Derived judgments

  • Accept-set at search: unchanged in kind from 8979fd3. One edge moves for every source: the binding is read once at the plan and not once per round. A source whose adapter is not mounted at the plan is refused with the code main's round already uses; none is searched that would not have been.
  • With feat(knowledge): a knowledge source needs no adapter and no requires entry; it binds to the deployment's store #38026 a source may name no adapter and bind to the deployment's store. The proof and the per-hit check follow the binding and not the authored name, so such a source over a qualifying object is proven and checked like any other. Right.
  • Hit shape, refusal codes, exports, the adapter contract: unchanged by the delta. SearchTarget is module-private.
  • Check-runs on the head: 42 success, 17 skipped, none failed or pending. Test Core 1 to 10, Lint and Repo Gates, the Type Check lanes, Build Core, Build Docs, Check Changeset, PR-body guards, Governed Surface Queue Guard and Dogfood Regression Gate read success. The dev report gives the dogfood battery on this head under the lock, 490 files passed and 3 skipped.

② Semver level

③ Boundary flags

  • open_questions: empty. security_findings: "withheld": for the seat, as before.
  • Out-of-scope note (admission file, suite, typecheck and the ablation run outside the verify lock): for the seat. The CI lanes ran the suite on the head; the closure rebuild and the battery ran under the lock.
  • The earlier record's point (h), due on this head, is answered: the proof and the search resolve through one binding; an unresolved binding is refused and never falls back to another adapter; the proof requirement is neither lost before the check nor carried onto the target (the target carries verifyHits instead); planSearches still fills the same refused array ahead of the first round, and a binding refusal is added by the round, so the whole-refusal test reads both.
  • SQL push-down: nothing new.

④ Design judgment

What else the merge brought, read for its bearing on this PR's contract: the no-adapter binding (#38026, above), hybrid search (#38037, above), record changes reaching the index without a realtime service (#38016: more sources are synced, through the same syncRecord path the per-hit repair uses; no sentence here depended on the realtime service), the Turso table guard (#38014) and the settings option (#38033), neither of which the proof or the docs sentences touch. The knowledge.mdx and knowledge-rag.mdx paragraphs of this PR are unchanged and still true beside main's new text.

N10 (nit) — a binding resolution that failed with an uncoded error would be skipped with no refusal and no log line; adapterIdFor and getAdapter throw only coded errors today, so it is unreachable, and it fails closed.

No must-fix, no should-fix.

Implemented-by: claude/area-o1C-37467
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): ACCEPT at head 3a69848a551bdfa3ac7aa283f41f98902666febe (Fixes #37467). Delta read, answering REWORK 7225954110.

Review summary

Contract review. I adopt delta record 7228746169 at this head: PASS at the contract tier, and verify-review-tier passes.

Gates.

  • dogfood_battery is pinned to this head and full: 490 files passed and 3 skipped, 4144 tests passed and 68 skipped, no failures, run under the verify lock.
  • Check-runs: 42 success, 17 skipped by design, 0 failed.
  • mergeable_state is clean.
  • The admission suite, the package suite, typecheck and the ablation ran unlocked at two workers after a lock timeout. That is a declared deviation, and CI covers those families.

Open nits, optional:

  • N10: a binding resolution that fails with an uncoded error is skipped with no log line. It is unreachable today and fails closed.

Next: this is a narrowing, so it goes to the seat for the Tier H approval. The PR is still a draft.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Seat record · 2026-11-27T21:49Z · PR #37963 (Fixes #37467) · head 3a69848a551bdfa3ac7aa283f41f98902666febe · Clause-②: yes (narrowing) — lands as Tier H

维护者速读

  • 做什么:知识检索的字段门槛不再额外检查名为 title 的字段。对可能还留着旧规则标题的知识源,改为先证明它的索引已经按当前规则完整重建过才搜;搜到的每条结果还要和记录当前内容核对一致才返回,核对不了就丢弃。
  • 风险:6 个文件 +926/−79,集中在 service-knowledge 的检索路径和 493 行测试。部署方会看到的变化:这类知识源在完成一次完整重建之前,搜索会返回「需要重建」(409);修法是 os knowledge rebuild <source>,内置适配器在启动或重载时也会自动重建。
  • 要你做什么:审批人批准即可。契约审核 PASS(链路 7221441058 → 7224831967 → 7225940231 → 7228746169),Head-sha 3a69848a551bdfa3ac7aa283f41f98902666febe;批准后座位自主落地。
  • 不批会怎样:门槛继续多问一个与知识源无关的 title 字段,有权看这个知识源的人会因此被误拒;索引是否新鲜也只能整体判断,没有逐条核对。

Seat opinion: land.

席位核对 — ACCEPT · repo:objectstack#1 · head 3a69848a55

  1. Shape. Draft, base main, 6 files (+926/−79): packages/services/service-knowledge/src/knowledge-service.ts, knowledge-source-admission.ts + __tests__/knowledge-source-admission.test.ts, content/docs/protocol/knowledge.mdx, content/docs/ai/knowledge-rag.mdx, new .changeset/37467-knowledge-title-arm-retired.md (patch, BREAKING bullets with a fix for each). Body: Clause-②: yes (narrowing), Metadata-protocol: none (adr-0087 not-required, reason recorded), Skills-docs: none (reason recorded), Security-touching: yes. check-governed-merges.mjs --pr 37963: no governed path; the narrowing declaration routes it the Tier H way.
  2. Premise measured. Per the records: M1 fails closed. S1 is ruled B with its conditions (seat ruling recorded on this thread). S5 is closed: a source that needs the index proof is searched only on the adapter instance that passed it, and a failed resolution is refused, with race pins. The merge of main carrying knowledge_source: adapter becomes optional (the deployment's store), and a knowledge_source item mounts the knowledge service #37306 keeps both intents. Card acceptance met.
  3. Gates (check-runs at this head). 42 success, 17 skipped, 0 failed; mergeable clean. Full dogfood battery green and pinned to this head under the lock (490 files, 4144 tests), service-knowledge: retire the field gate's title arm once a source's index is proven built under the current recipe #37467 comment 7228689908.
  4. Accepted deviations. N10 (unreachable, fails closed) accepted as recorded.
  5. Out of scope → where it went. Nothing new filed from this head. Security-touching: yes: this PR changes which sources and hits a caller's search is served. The hardening is stated here at rule level only.
  6. Landing terms. L1-a ACCEPT 7228766486 + contract review PASS 7228746169 (CONTRACT_REVIEW_TIER, same head, "No must-fix, no should-fix") ⇒ ②③ in one --handoff stroke. After an authorised APPROVED, seat 1 lands it (maintainer's seat-thread line 2026-11-26T13:33Z 「审批人批准后的 Tier H PR 你可以自主落地」). A head move other than a clean main merge withdraws the hand-off.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Approval request · Clause-②: yes (narrowing) (Tier H) · PR #37963 (Fixes #37467) · head 3a69848a551bdfa3ac7aa283f41f98902666febe

@os-zhuang: the knowledge field gate retires its title arm (ADR-0090 D10 rule 1). A source whose index could still hold an earlier-rule title is searched only once its adapter proves a complete build under the current recipe; otherwise it answers KNOWLEDGE_REBUILD_REQUIRED (409). Each hit of a proven source is then served only when its stored docHash matches the record as it reads now. BREAKING bullets with fixes are in the changeset. Records on this head:

Every check is green or expected-skip. An APPROVED review on this head lets seat repo:objectstack#1 ready and land it; nothing else is asked.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

service-knowledge: retire the field gate's title arm once a source's index is proven built under the current recipe

2 participants